package com.ytjj.qmyx.admin.eunm.im;

/**
 * @Description 会话转移类型
 * @ClassName ImSessionTransferTypeEnums
 * 
 * 
 * @Version 1.0
 **/
public enum ImSessionTransferTypeEnums {
    ACTIVE(1, "主动转移"),
    PASSIVE(2, "被动转移"),
    ;

    private Integer code;
    private String message;

    ImSessionTransferTypeEnums(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static String getMessageByCode(Integer code){
        for (ImSessionTransferTypeEnums value : ImSessionTransferTypeEnums.values()) {
            if(value.getCode().equals(code)){
                return value.getMessage();
            }
        }
        return null;
    }

    public static Integer getCodeByMessage(String message){
        for (ImSessionTransferTypeEnums value : values()) {
            if(value.getMessage().equals(message)){
                return value.getCode();
            }
        }
        return null;
    }
}
